package com.cloudkinto.service.order.vo.bigcommerce;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class OrderBigCommerceEntity {
    @JsonProperty("id")
    private Long id;
    @JsonProperty("customer_id")
    private Long customerId;
    @JsonProperty("date_created")
    private String dateCreated;
    @JsonProperty("date_modified")
    private String dateModified;
    @JsonProperty("date_shipped")
    private String dateShipped;
    @JsonProperty("status_id")
    private Long statusId;
    @JsonProperty("status")
    private String status;
    @JsonProperty("subtotal_ex_tax")
    private String subtotalExTax;
    @JsonProperty("subtotal_inc_tax")
    private String subtotalIncTax;
    @JsonProperty("subtotal_tax")
    private String subtotalTax;
    @JsonProperty("base_shipping_cost")
    private String baseShippingCost;
    @JsonProperty("shipping_cost_ex_tax")
    private String shippingCostExTax;
    @JsonProperty("shipping_cost_inc_tax")
    private String shippingCostIncTax;
    @JsonProperty("shipping_cost_tax")
    private String shippingCostTax;
    @JsonProperty("shipping_cost_tax_class_id")
    private Integer shippingCostTaxClassId;
    @JsonProperty("base_handling_cost")
    private String baseHandlingCost;
    @JsonProperty("handling_cost_ex_tax")
    private String handlingCostExTax;
    @JsonProperty("handling_cost_inc_tax")
    private String handlingCostIncTax;
    @JsonProperty("handling_cost_tax")
    private String handlingCostTax;
    @JsonProperty("handling_cost_tax_class_id")
    private Integer handlingCostTaxClassId;
    @JsonProperty("base_wrapping_cost")
    private String baseWrappingCost;
    @JsonProperty("wrapping_cost_ex_tax")
    private String wrappingCostExTax;
    @JsonProperty("wrapping_cost_inc_tax")
    private String wrappingCostIncTax;
    @JsonProperty("wrapping_cost_tax")
    private String wrappingCostTax;
    @JsonProperty("wrapping_cost_tax_class_id")
    private Integer wrappingCostTaxClassId;
    @JsonProperty("total_ex_tax")
    private String totalExTax;
    @JsonProperty("total_inc_tax")
    private String totalIncTax;
    @JsonProperty("total_tax")
    private String totalTax;
    @JsonProperty("items_total")
    private Integer itemsTotal;
    @JsonProperty("items_shipped")
    private Integer itemsShipped;
    @JsonProperty("payment_method")
    private String paymentMethod;
    @JsonProperty("payment_provider_id")
    private String paymentProviderId;
    @JsonProperty("payment_status")
    private String paymentStatus;
    @JsonProperty("refunded_amount")
    private String refundedAmount;
    @JsonProperty("order_is_digital")
    private Boolean orderIsDigital;
    @JsonProperty("store_credit_amount")
    private String storeCreditAmount;
    @JsonProperty("gift_certificate_amount")
    private String giftCertificateAmount;
    @JsonProperty("ip_address")
    private String ipAddress;
    @JsonProperty("ip_address_v6")
    private String ipAddressV6;
    @JsonProperty("geoip_country")
    private String geoipCountry;
    @JsonProperty("geoip_country_iso2")
    private String geoipCountryIso2;
    @JsonProperty("currency_id")
    private Integer currencyId;
    @JsonProperty("currency_code")
    private String currencyCode;
    @JsonProperty("currency_exchange_rate")
    private String currencyExchangeRate;
    @JsonProperty("default_currency_id")
    private Integer defaultCurrencyId;
    @JsonProperty("default_currency_code")
    private String defaultCurrencyCode;
    @JsonProperty("staff_notes")
    private String staffNotes;
    @JsonProperty("customer_message")
    private String customerMessage;
    @JsonProperty("discount_amount")
    private String discountAmount;
    @JsonProperty("coupon_discount")
    private String couponDiscount;
    @JsonProperty("shipping_address_count")
    private Integer shippingAddressCount;
    @JsonProperty("is_deleted")
    private Boolean isDeleted;
    @JsonProperty("ebay_order_id")
    private String ebayOrderId;
    @JsonProperty("cart_id")
    private String cartId;
    @JsonProperty("billing_address")
    private BillingAddressDTO billingAddress;
    @JsonProperty("is_email_opt_in")
    private Boolean isEmailOptIn;
    @JsonProperty("credit_card_type")
    private Object creditCardType;
    @JsonProperty("order_source")
    private String orderSource;
    @JsonProperty("channel_id")
    private Integer channelId;
    @JsonProperty("external_source")
    private String externalSource;
    @JsonProperty("products")
    private ProductsDTO products;
    @JsonProperty("shipping_addresses")
    private ShippingAddressesDTO shippingAddresses;
    @JsonProperty("coupons")
    private CouponsDTO coupons;
    @JsonProperty("external_id")
    private Object externalId;
    @JsonProperty("external_merchant_id")
    private Object externalMerchantId;
    @JsonProperty("tax_provider_id")
    private String taxProviderId;
    @JsonProperty("customer_locale")
    private String customerLocale;
    @JsonProperty("external_order_id")
    private String externalOrderId;
    @JsonProperty("store_default_currency_code")
    private String storeDefaultCurrencyCode;
    @JsonProperty("store_default_to_transactional_exchange_rate")
    private String storeDefaultToTransactionalExchangeRate;
    @JsonProperty("custom_status")
    private String customStatus;

    @NoArgsConstructor
    @Data
    public static class BillingAddressDTO {
        @JsonProperty("first_name")
        private String firstName;
        @JsonProperty("last_name")
        private String lastName;
        @JsonProperty("company")
        private String company;
        @JsonProperty("street_1")
        private String street1;
        @JsonProperty("street_2")
        private String street2;
        @JsonProperty("city")
        private String city;
        @JsonProperty("state")
        private String state;
        @JsonProperty("zip")
        private String zip;
        @JsonProperty("country")
        private String country;
        @JsonProperty("country_iso2")
        private String countryIso2;
        @JsonProperty("phone")
        private String phone;
        @JsonProperty("email")
        private String email;
        @JsonProperty("form_fields")
        private List<?> formFields;
    }

    @NoArgsConstructor
    @Data
    public static class ProductsDTO {
        @JsonProperty("url")
        private String url;
        @JsonProperty("resource")
        private String resource;
    }

    @NoArgsConstructor
    @Data
    public static class ShippingAddressesDTO {
        @JsonProperty("url")
        private String url;
        @JsonProperty("resource")
        private String resource;
    }

    @NoArgsConstructor
    @Data
    public static class CouponsDTO {
        @JsonProperty("url")
        private String url;
        @JsonProperty("resource")
        private String resource;
    }
}
